package jp.co.jbuy.db.query;

import jp.co.jbuy.db.table.SystemMessageTable;

public class SystemMessageQuery extends Query {

	public String getContentZhCn() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_CONTENT_ZH_CN);
	}
	
	public String getContentZhTw() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_CONTENT_ZH_TW);
	}
	
	public String getContentJp() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_CONTENT_JP);
	}
	
	public String getContentEn() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_CONTENT_EN);
	}

	public String getMessageKey() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_MESSAGE_KEY);
	}
	
	public String getPageId() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_PAGE_ID);
	}
	
	public String getNote() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_NOTE);
	}
	
	public String getMessageKind() throws java.sql.SQLException {
		return result_.getString(SystemMessageTable.COL_MESSAGE_KIND);
	}

	public void searchAll(java.sql.Connection conn)
			throws java.sql.SQLException {
		String sql = "SELECT " + SystemMessageTable.COL_MESSAGE_KEY +","+
				SystemMessageTable.COL_PAGE_ID+" , "+
				SystemMessageTable.COL_CONTENT_ZH_CN+" , "+
				SystemMessageTable.COL_CONTENT_ZH_CN+" , "+
				SystemMessageTable.COL_CONTENT_ZH_TW+" , "+
				SystemMessageTable.COL_CONTENT_JP+" , "+
				SystemMessageTable.COL_CONTENT_EN+" , "+
				SystemMessageTable.COL_MESSAGE_KIND+" , "+
				SystemMessageTable.COL_NOTE+" "+
				"FROM "+
				SystemMessageTable.TABLE_NAME;
		
		statement_ =  conn.prepareStatement(sql);
		result_ = statement_.executeQuery();
	}
}
